package Log_in_test;

import org.testng.annotations.Test;

public class BetterexamplewithPOM {
  @Test(priority=1)
  public void ScriptFalseLoginBetterCodeExampleForPOM() {
		String username = "bigtester";
		String password = "bigtester";
			
		try {
			Homepage nlHomepage = new Homepage(null);
			nlHomepage.getLoginForm().typeUsername(username);
			nlHomepage.getLoginForm().typePassword(password);
			//nlHomepage.getLoginForm().loginAs(username, password);
			//nlHomepage.wait(10000);
			//if (driver.getPageSource().contains("Change Password")) {
            	//how to verify the login?
            	//System.out.println("Succeed logged in, Welcome");
			nlHomepage.getLoginForm().submitFalseLogin();
			//do not execute 
			System.out.println("False Login page appears");

		   //TrueLoggedInpage nlLoggedIn = new TrueLoggedInpage(null);
		   
		   //nlLoggedIn.getTruelLoggedInpage();
			
		} catch (Exception e) {
			System.out.println("HAHAHAHAHA");
		}

				 
  }


	
}
